(function($){
 
  $.fn.labelswitch = function(){  
    return this.each(function(){
      var $this = $(this);
	  
      function init(){             
		$this.addClass("label_active");	
		$this.attr('label',$this.prev('label').text());
		$this.val($this.prev('label').text());
      }    
      
      init();
      
	  $this.focus(function(){
		  var $t = $(this);
		  if($t.val() == "" || $t.val() == $t.attr('label')){
			$t.val("");
		  }
		}).blur(function(){
		  var $t = $(this);
		  if($t.val() == ""){
			$t.val($t.attr('label'));
		  }
	  });
	  
    }); 
  }; 
})(jQuery);
